<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<?php
$attributes = array(
    'class' => 'control-label',
);
?>
<div class="span9">
    <h2><?php echo $titulo; ?></h2>
    <?php echo get_message(); ?>
    <?php echo form_open(); ?> 
    <div class="control-group">
        <?php echo form_label('Médico', 'medico', $attributes);?>
        <p><strong><?php echo $medico->nombre; ?></strong></p>
        <div class="controls">
            <?php echo form_input(array('class' => 'span6', 'name' => 'matricula', 'type' => 'hidden', 'value' => $medico->matricula)); ?>
        </div>
    </div> 
    <div class="control-group">
    <?php
        echo form_label('Fecha', 'fecha', $attributes);?>
        <div class="controls input-append">
            <?php
            echo form_input(array('class' => 'span3 date-time', 'data-time-format' => 'hh:MM:ss', 'name' => 'hora', 'type' => 'text', 'value' => $cita['hora']));
            ?><span class="add-on"><i class="icon-time"></i></span>
        </div> 
        <div class="controls input-append">
            <?php
            echo form_input(array('class' => 'span3 date-picker', 'data-date-format' => 'dd/mm/yyyy', 'name' => 'fecha', 'type' => 'text', 'value' =>$cita['fecha'] )); 
            ?>
            <span class="add-on"><i class="icon-calendar"></i></span>
        </div>
    </div>
    
    <div class="control-group">
        <?php echo form_label('Motivo consulta', 'motivo', $attributes); ?>
        <div class="controls">
            <?php echo form_textarea(array('class' => 'span6', 'rows' => '5', 'name' => 'motivoConsulta', 'type' => 'text', 'value' => $cita['motivoConsulta'])); ?> 
        </div>
    </div>
    
    
    <div class="control-group">
        <div class="controls">
            <?php echo form_input(array('class' => 'span6', 'name' => 'submit', 'type' => 'submit', 'value' => 'Guardar', 'class' => 'btn')); ?>
            <button type="button" onclick="window.location = '<?php echo base_url('citas'); ?>';" class="btn">Cancelar</button>
        </div>
        
    </div>
    <?php echo form_close(); ?>

</div>